# -*- coding: utf-8 -*- 
# @project : 《Atcoder》
# @Author : created by bensonrachel on 2021/7/5
# @File : 178 C - Ubiquity.py



N = int(input())
p = 1000000007


def ksmqy(base, exponent):
    a = 1
    while (exponent):
        if (exponent % 2 == 1): a = a * base % p
        base = base * base % p
        exponent = exponent // 2
    return a


x = ksmqy(10, N) % p - ksmqy(9, N) % p - ksmqy(9, N) % p + ksmqy(8, N) % p
x = x % p
print(int(x))

"""
解法：容斥原理+快速幂
当正面思考不对时，思考：减法原理。

|¯𝐴_1∩¯𝐴_2 |=|S|-|A1|-|A2|+|A1⋂A2|
https://atcoder.jp/contests/abc178/editorial/126
"""

